#!/usr/bin/env bash
echo "开始启动java程序。。。。"
export BUILD_ID=dontKillMe
nohup java -Xms246m -Xmx500m -Dhudson.util.ProcessTree.disable=true -jar /var/lib/jenkins/workspace/pipi/target/login-test-0.0.1-SNAPSHOT.jar >/dev/null 2>&1 &
sleep 10s

java_project_id=`ps -ef | grep "SNAPSHOT.jar" | grep -v grep | awk '{print $2}'`

echo $java_project_id

for id in $java_project_id
do
    if [ "$id" != "" ]; then
        echo "START SUCCESS ， JAVA PID : " + $id
    fi

    if [ "$id" -ne "" ]; then
        echo "START SUCCESS ， JAVA PID : " + $id
    fi

    if [ -n $id ]; then
        echo "START SUCCESS ， JAVA PID : " + $id
    fi
done
